<!-- eslint-disable vue/require-valid-default-prop -->
<script setup>
import { computed } from 'vue'
import * as dayjs from 'dayjs'
const props = defineProps({
  list: {
    type: Object,
    default: {}
  }
})
console.log(props.list)
const score = computed(() => {
  return props.list.score
})
</script>
<template>
  <div class="v-evaluation-list">
    <div class="v-evaluation-left">
      <img :src="list.memberHeadImgUrl" alt="" />
    </div>
    <div class="v-evaluation-right">
      <p class="v-evaluation-name">
        <span>{{ list.memberNickName }}</span
        ><van-rate v-model="score" size="0.9em" color="#f8a33f" readonly />
      </p>
      <p class="v-evaluation-project">
        {{ list.projectName }}&nbsp;{{
          dayjs(list.createTime).format('YYYY.MM.DD')
        }}
      </p>
      <p class="v-evaluation-detail">
        {{ list.content }}
      </p>
    </div>
  </div>
</template>
<style lang="scss" scoped>
.v-evaluation-list {
  margin: 20px 15px 0;
  display: flex;
  justify-content: space-between;
  .v-evaluation-left {
    width: 31px;
    height: 31px;
    border-radius: 50% 50%;
    overflow: hidden;

    img {
      width: 100%;
      height: 100%;
    }
  }
  .v-evaluation-right {
    width: 306px;
    .v-evaluation-name {
      font-size: 14px;
      color: #212532;
      line-height: 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .v-evaluation-project {
      color: #848484;
      font-size: 12px;
      line-height: 20px;
    }
    .v-evaluation-detail {
      padding: 14px 0 18px;
      font-size: 14px;
      color: #212532;
      line-height: 21px;
      position: relative;
      &::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        border-bottom: 1px solid #eaeaea;
        transform: scaleY(0.5);
      }
    }
  }
}
</style>
